Release 10.1A: OpenEdge Development:
Web Services
Accessing a session-managed Web service
To access a session-managed Web service, you must help to maintain connection context by passing object ID’s associated with each request.
![]()
To begin using a session-managed Web service:
- Instantiate (create) the AppObject as appropriate for the client platform.
- Connect to an AppServer by calling the connect method on the AppObject before calling any other Web Service (AppObject) method.
- Obtain the AppObject ID value from the SOAP response header for the connect method and use it for all subsequent calls to methods on the session-managed AppObject.
- Invoke any available methods on the AppObject, as required.
- Ensure that the last method you invoke on the AppObject is the object’s release method. For more information, see the "Releasing an object" section.
As with other Open Clients, there is no Progress 4GL involved in implementing the connect method on an AppObject. For Web services, however, the operation is an object method that is required by the WSA.
This is a VB.NET declaration for an AppObject connect method,
Connect_OrderInfo( ):
Note: For more information on the parameters to this method, see the sections on connecting to an AppServer in OpenEdge Development: Open Client Introduction and Programming . Note that there is no AppServer URL parameter. For a Web service (unlike other Open Client applications), the deployer manages the AppServer connection information for each Web service through the WSA instance where the Web service is deployed. Each deployed Web service has writable properties to specify this information. For more information, see the sections on Web service deployment in OpenEdge Application Server: Administration .
When the client executes the connect method, the SOAP response message contains a SOAP header with the AppObject ID. You must send this AppObject ID in the SOAP header of the request message for every subsequent method call on the AppObject.
This is a sample instantiation and invocation of the connect method on the
OrderInfoAppObject:
This is a sample RPC/Encoded SOAP request message that might be generated from invoking the
Connect_OrderInfo( )method, as in the example:
Note the data for the request highlighted in the example for parameters passed as empty strings.
This is a sample RPC/Encoded SOAP response that might be generated by the WSA as a response to the
Connect_OrderInfo( )method:
Note the value for the returned AppObject ID,
OrderInfo, highlighted in the example. Thus, the SOAP response header returns the following AppObject ID contained in theOrderInfoIDelement:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |